interface MpWxPos {
	top: number // 导航栏高度坐标
	height: number // 顶部高度
	left: number // 左边距
	width: number // 宽度
	right: number // 右边距
	bothSideMargin: number // 左右边距
	headerHeight: number // 顶部高度+10
	logoTop: number // logo顶部高度
	logoHeight: number // logo高度
	logoWidth: number // logo宽度
	logoUrl: string // logo地址
}

export default {
	namespaced: true, // 开启命名空间
	state: {
		mpWxPos: <MpWxPos>{
			top: 0,
			height: 0,
			left: 0,
			width: 0,
			right: 0,
			bothSideMargin: 0,
			headerHeight: 0,
			logoTop: 0,
			logoHeight: 0,
			logoWidth: 0,
			logoUrl: ''
		}
	},
	getters: {
		getMpWxPos: (state) => {
			return state.mpWxPos
		}
	},
	mutations: {
		updateMpWxPos(state, newMpWxPos) {
			state.mpWxPos = Object.assign(state.mpWxPos, newMpWxPos)
			console.log('updatedMpWxPos:', newMpWxPos)
		}
	},
	actions: {}
}
